nlp_architect.data.fasttext_emb.FastTextEmb

class nlp_architect.data.fasttext_emb.FastTextEmb(path, language, vocab_size, emb_dim=300)[source]

Downloads FastText Embeddings for a given language to the given path. :param path: Local path to copy embeddings :type path: str :param language: Embeddings language :type language: str :param vocab_size: Size of vocabulary :type vocab_size: int

Returns

Returns a dictionary and reverse dictionary Returns a numpy array with embeddings in emb_sizexvocab_size shape

__init__(path, language, vocab_size, emb_dim=300)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(path, language, vocab_size[, emb_dim])

Initialize self.

load_embeddings()

read_embeddings(filepath)

load_embeddings()[source]
read_embeddings(filepath)[source]